e
#Title[FuCYEAE`F[ubTv]
#Text[gCEUNV
FuCYEAE`F[ubTv]
#BackGround[User]
#BGM[.\..\bgm\bgm.wav]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
	
	////////////////////////////////////////////////////////////////////////
	//                                                          //
	//   e摜̕ύX(PURPLE23͑ΉeȂ̂ŕςĂȂł)   //
	//   e̔ˊԊu𑁂                                         //
	//   GtFNg̈ʒu[~Aɍ킹Ē                     //
	////////////////////////////////////////////////////////////////////////
	
	@Initialize{
		InitializeData();
		
		LoadUserShotData(shot_ryoyan);
		
		SetLife(1000);
		SetMovePosition03(GetCenterX(),120,10,8);
		SetDamageRate(15,16);
		SetInvincibility(240);
		SetCollisionEx(32,16);
		SetEnemyMarker(true);
		
		TMain();
	}
	
	@MainLoop{
		yield;
	}
	
	@DrawLoop{
		DrawBoss(imgBoss);
	}
	
	@Finalize{
		FinalizeData();
	}
	
	task TMain(){
		wait(60);
		
		DeclareSpell();
		
		Atack();
		Move();
	}
	
	function DeclareSpell(){
		SetTimer(90);
		CutIn(YOUMU,"FuCYEAE`F[ubTv",NULL,0,0,0,0);
		SetScore(1000000);
		wait(180);
	}
	
	task Atack(){
		a();
		b();
	}
	
	task a(){
		let count=0;
		
		wait(10);
		
		loop{
			let x=0;
			if(count % 2 == 0) {
				x=GetClipMinX()+rand(0,130);
			}else{
				x=GetClipMaxX()-rand(0,130);
			}
			
			let y=GetClipMaxY();
			let ang=rand(-70,-110);
			CreateShotA(0,x,y,40);
			SetShotDataA(0,0,0,ang,0,0.05,2,_PURPLE22());
			ascent(cnt2 in 0..90){
				CreateShotA(1,rand(-5,5),rand(-5,5),rand_int(10,20));
				SetShotDataA(1,0,0,0,0,0,0,_PURPLE01());
				SetShotKillTime(1,0);
				AddShot(cnt2*3,0,1,0);
			}
			ascent(cnt2 in 0..30) {
				CreateShotA(1,0,0,0);
				SetShotDataA(1,0,rand(1,1.5),rand(60,120),0,0,0,PURPLE23());
				AddShot(60+cnt2*10,0,1,0);
			}
			FireShot(0);
			wait(16);
			count++;
		}
	}
	
	task b(){
		let count=0;
		
		onPose = true;
		
		wait(50);
		
		loop{
			CreateShotA(0,GetX()-24+count%2*40+rand(-2,2),GetY() - 14 + rand(-2,2),rand_int(15,30));
			SetShotDataA(0,0,0,0,0,0,0,_BLUE04());
			SetShotKillTime(0,0);
			FireShot(0);
			yield;
			count++;
		}
	}
	
	task Move(){
	}
	
	#include_function ".\..\functions\initialize.txt"
	#include_function ".\..\functions\color_set.txt"
	#include_function ".\..\functions\function.txt"
}
